package HomeWork0729;

import org.omg.CORBA.PUBLIC_MEMBER;

public class Rect {
	private int width;
	private int height;
	public Rect(int width, int height) {
		super();
		this.width = width;
		this.height = height;
		
	}
	public Rect() {
		super();
		this.width = 1;
		this.height = 1;
	}
	public Rect(int height) {
		super();
		this.height = height;	
	}
	public int mianJi() {
		return width * height;
	}
	
	public int zhouChang() {
		return (width + height) * 2;
	}
	
	
	
	
	
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getHeight() {
		return height;
	}
	public void setHeight(int height) {
		this.height = height;
	}
	@Override
	public String toString() {
		return "Rect [width=" + width + ", height=" + height + "]";
	}
	
	
}
